package com.kly.order.db.dao;
import com.fqgj.common.base.BaseMapper;
import com.kly.order.db.dbo.UserPCountDBO;
import com.kly.order.db.entity.ConsumptionRecordEntity;

import java.time.LocalDateTime;
import java.util.List;

/**
* User: 11437
* Date: 2023-08-02
* Time: 17:29:37.914
*/

public interface ConsumptionRecordDao  extends BaseMapper<ConsumptionRecordEntity> {

    ConsumptionRecordEntity getLastRecord(String userCode, String chatUserCode, String imageCode);

    List<ConsumptionRecordEntity> listBenefits(String userCode, String chatUserCode);

    List<UserPCountDBO> getUserPCount(String chatUserCode, String chatterUserCode, LocalDateTime startTime, LocalDateTime endTime);


    /**
     * 读取ppv是否解锁
     * @param userCode
     * @param chatUserCode
     * @param imageCode
     * @return
     */
    int getUnlockCount(String userCode, String chatUserCode, String imageCode);


    /**
     * 读取
     * @param chatUserCode
     * @return
     */
    List<ConsumptionRecordEntity> unLockList(String chatUserCode);

    /**
     * 查询主播解锁数
     */
    List<UserPCountDBO> listUnlockNum(String chatterUserCode, String startDate, String endDate);


}